package com.woniuxy.orderservice.service;


import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.core.util.PageInfo;
import com.woniuxy.orderdao.model.Order;
import com.woniuxy.ordermodel.dto.*;
import com.woniuxy.ordermodel.form.CoachListOrderForm;
import com.woniuxy.ordermodel.form.UserListOrderForm;
import com.woniuxy.ordermodel.form.VenueListOrderForm;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 冉杰
 * @since 2024-01-15
 */
public interface OrderService extends IService<Order> {

    List<CoachListOrderDto> findByCoachId(Integer coachId);

    List<VenueListOrderDto> findByVenueId(Integer venueId);

    AloneCourseOrderDto addAloneCourseOrder(Integer coachReservId, Integer coachId);

    OrderDto findByOrderNum(String orderNum);

    void cancelAloneCourse(String orderNum, String token);


    PageInfo<UserCourseOrderDto> userListOrder(UserListOrderForm form, Integer userId);

    PageInfo<CoachListOrderDto> coachListOrder(CoachListOrderForm form, Integer coachId);

    PageInfo<VenueListOrderDto> venueListOrder(VenueListOrderForm form, Integer venueId);


    String pagePay(String orderNum) throws Exception;

    void notifyCoachHandler(Map<String, String> params) throws AlipayApiException;

    TeamCourseOrderDto addTeamCourseOrder(Integer teamReservId, Integer userId);

    void notifyTeamHandler(Map<String, String> params) throws AlipayApiException;

    CountCardOrderDto addCountCardOrder(Integer cardId, Integer userId);

    ValidCardOrderDto addValidCardOrder(Integer cardId, Integer userId);

    void notifyCountCardHandler(Map<String, String> params) throws AlipayApiException;

    void notifyValidCardHandler(Map<String, String> params) throws AlipayApiException;

}
